package com.powernode.business.mapper;

import com.powernode.business.domain.Customer;
import com.powernode.business.vo.AreaVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    /**
     * 分页查询所有用户
     *
     * @param customer
     * @param deptId
     * @return
     */
    List<Customer> selectCustomerList(@Param("customer") Customer customer, @Param("deptId") Long deptId);

    /**
     * 删除用户
     * @param ids
     * @return
     */
    int deleteCustomerById(Long[] ids);

    List<Customer> selectCustomerDept();
    /**
     * 删除用户
     * @param ids
     * @param username
     * @return
     */
    int deleteCustomer(@Param("ids") List<Integer> ids, @Param("username") String username);

    Customer selectByIdentity(String identity);

    List<AreaVo> selectArea();
}